Repository navigation
fix(drawer): expand the collapsed item indicator when it becomes active - #5233
Merged
Merged
Conversation
The indicator only expanded on press out, so an item made active without a press (for example by a route change) kept the half-width indicator. Animate it to full size whenever active turns true. After a press the indicator is already at full size or on its way there, and the new animation carries on from its current value.
Apex Sentinel · ✅ Approve · review of
|
| Finding | Dismissed by | |
|---|---|---|
| 🟡 | New no-press expansion animates even when the app sets reduceMotion | @Doberjohn |
To raise one again, reply @apex-sentinel-staging note ... in its thread. It stays dismissed only if Sentinel's re-check withdraws it.
Reviewed with this repository's own Sentinel configuration (86430de2a63e).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 1fa859a. The verdict and the full list are in the summary comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Drawer.CollapsedItemwidened its active indicator only on press out. Whenactiveturned true any other way, such as a route change or a TalkBack activation (onPresswithoutonPressOut), the indicator stayed at half width. It now animates to full width wheneveractiveturns true.Related issue
None filed. Found while sampling the indicator's animated style in Jest.
Screenshots / Videos
Before and after on Android; a timer changes the active item, no press:
Before:
drawer-android-before-main.mp4
After:
drawer-android-after-fix.mp4
Test plan
With "Collapsed drawer" on in the example: